//
//  AccountCell.m
//  cm
//
//  Created by suyibaishan on 2017/11/6.
//  Copyright © 2017年 feihu. All rights reserved.
//

#import "AccountCell.h"

@implementation AccountCell

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self constructUI];
    }
    return self;
}

-(void)constructUI
{
    self.contentView.backgroundColor = [UIColor colorWithRed:0.96 green:0.96 blue:0.96 alpha:1];
    
    _titleLabel = [[UILabel alloc] init];
    _titleLabel.textColor = [UIColor blackColor];
    _titleLabel.text = @"张良";
    _titleLabel.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:_titleLabel];
    _titleLabel.sd_layout
    .leftSpaceToView(self.contentView, 15)
    .topSpaceToView(self.contentView, 10)
    .widthIs(65)
    .heightIs(30);
    
    _contentField = [[UITextField alloc] initWithFrame:CGRectMake(45, 0, kScreenWidth - 80, 45)];
    _contentField.textColor = [UIColor blackColor];
    _contentField.returnKeyType = UIReturnKeyDone;
    _contentField.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:_contentField];
    _contentField.sd_layout
    .leftSpaceToView(_titleLabel, 5)
    .topSpaceToView(self.contentView, 10)
    .widthIs(kScreenWidth/2)
    .heightIs(30);
    
    UIView *line = [[UIView alloc] init];
    line.backgroundColor = [UIColor colorWithRed:0.9 green:0.9 blue:0.9 alpha:1];
    [self.contentView addSubview:line];
    line.sd_layout
    .bottomSpaceToView(self.contentView, 0)
    .leftSpaceToView(self.contentView, 0)
    .widthIs(kScreenWidth)
    .heightIs(0.5);
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
